package com.panda.mall.common.mallOrder.feign;

import com.panda.mall.common.constants.ServicesName;
import com.panda.mall.common.mallOrder.entity.MallOrder;
import com.panda.mall.common.mallWares.entity.MallGoodsCategory;
import com.panda.mall.common.result.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * author: tcy
 * createDate: 2023/2/3
 * description:订单feign调用
 */
@FeignClient(value = ServicesName.MALL_ORDER,fallbackFactory = OrderFallbackFactory.class)
public interface OrderFeign {

    @ApiOperation(value = "查询订单", notes = "查询订单")
    @PostMapping("/order/info/queryOrders")
    Result<List<MallOrder>> queryOrders();

    @ApiOperation(value = "按id查询订单", notes = "按id查询订单")
    @GetMapping("/order/info/queryOrderById/{id}")
    Result<MallOrder> queryOrderById(@PathVariable("id") Long id);
}
